package com.java.base.exercise.jvm;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

/**
 * @Author RenPu
 * @Date 2021/10/13 18:04
 * @Version 1.0
 * @Description: *VM参数：-verbose：gc
 * -Xms20M  堆最小值
 * -Xmx20M  堆最大值
 * -Xmn10M  年轻代 eden+survior1+survior2=10M   eden=8M  survior1=1M survior2=1M
 * -XX：+PrintGCDetails 打印
 **/
public class TestAllocation {
    private static final int _1MB = 1024 * 1024;

    public static void main(String[] args) {
//        byte[] allocation1, allocation2, allocation3, allocation4;
//        allocation1 = new byte[2 * _1MB];
//        allocation2 = new byte[2 * _1MB];
//        allocation3 = new byte[2 * _1MB];
//        allocation4 = new byte[4 * _1MB];


//            String date = LocalDateTime.now().format(
//                    DateTimeFormatter.ofPattern("yyyy-MM-dd")).substring(2,10).replaceAll("-", "");
//        System.out.println(date);
//
//        String substring = date.substring(0, 4);
//        System.out.println(substring+"--------");








    }
    static class Author {
        private Integer id;
        private String name;
        private Integer age;
// 省略 getter/setter
    }


}
